/*******************************************************************************
Paper: Does the Production Approach to Markup Estimation Match a Stylized Fact?
Description: Extracts relevant variables from the Serrano database
Author: Tove Forsbacka
Last Updated: 15 February 2026
*******************************************************************************/

* Setup and environment control 
clear
set more off
capture log close 
version 18.5

* Define path and load the data
*cd "PROJECT_PATH"
use "serrano.dta"

* Keep relevant variables
keep ORGNR ser_namn ser_year ser_kommunx ser_aktiv ser_ftgkategori ///
 bransch_sni071 bransch_sni072 bransch_sni073 bransch_sni074 bransch_sni075 ///
 bransch_sni1 bransch_sni2 bransch_sni3 bransch_sni4 bransch_sni5 

* Rename year to match to bokslut data
rename ser_year year

* Saving the data
save "serrano_variables.dta", replace

